package com.service.impl;

import com.Dao.Theme_PostDao;
import com.entity.Theme_Post;
import com.service.Theme_PostService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("theme_postService")
public class Theme_PostServiceImpl implements Theme_PostService {
    @Resource
    private Theme_PostDao theme_postDao;

    @Override
    public int addTheme_Post(Theme_Post theme_post) {
        return theme_postDao.addTheme_Post(theme_post);
    }

    @Override
    public int updateTheme_Post(Theme_Post theme_post) {
        return theme_postDao.updateTheme_Post(theme_post);
    }

    @Override
    public Theme_Post getTheme_PostByTheme_post_id(int theme_post_id) {
        return theme_postDao.getTheme_PostByTheme_post_id(theme_post_id);
    }

    @Override
    public List<Theme_Post> getTheme_PostByUser_id(int user_id) {
        return theme_postDao.getTheme_PostByUser_id(user_id);
    }

    @Override
    public List<Theme_Post> getTheme_PostByTitle(String theme_post_title) {
        return theme_postDao.getTheme_PostByTitle(theme_post_title);
    }

    @Override
    public List<Theme_Post> getTheme_PostByUser_name(String user_name) {
        return theme_postDao.getTheme_PostByUser_name(user_name);
    }

    @Override
    public int countTheme_PostNum() {
        return theme_postDao.countTheme_PostNum();
    }

    @Override
    public int deleteTheme_Post(Theme_Post theme_post) {
        return theme_postDao.deleteTheme_Post(theme_post);
    }
}
